-- GENERATED SPELL FOR [Skeletal Runesmith] --


function spell0_31321(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42724,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31321', 629, 1)
end

function spell1_31321(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31321', 10000, 1)
end

function Sorts_31321(pUnit, Event)
local choix_sorts_31321 = math.random(0, 1)
if choix_sorts_31321 == 0 then
pUnit:RegisterEvent('spell0_31321', 1, 1)
end
if choix_sorts_31321 == 1 then
pUnit:RegisterEvent('spell1_31321', 1, 1)
end
end

function mob31321_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31321', math.random(1500, 3000), 1)
end

function mob31321_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31321_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31321_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31321, 1, 'mob31321_Action')
RegisterUnitEvent(31321, 2, 'mob31321_Leave')
RegisterUnitEvent(31321, 3, 'mob31321_Kill')
RegisterUnitEvent(31321, 4, 'mob31321_Die')
